3.90 \(\int \frac {\tan (x)}{\sqrt {1+\cos ^2(x)}} \, dx\)

Optimal. Leaf size=11 \[ \tanh ^{-1}\left (\sqrt {\cos ^2(x)+1}\right ) \]

[Out]

arctanh((1+cos(x)^2)^(1/2))

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3194, 63, 207} \[ \tanh ^{-1}\left (\sqrt {\cos ^2(x)+1}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Tan[x]/Sqrt[1 + Cos[x]^2],x]

[Out]

ArcTanh[Sqrt[1 + Cos[x]^2]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 3194

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.)*tan[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = Free
Factors[Sin[e + f*x]^2, x]}, Dist[ff^((m + 1)/2)/(2*f), Subst[Int[(x^((m - 1)/2)*(a + b*ff*x)^p)/(1 - ff*x)^((
m + 1)/2), x], x, Sin[e + f*x]^2/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\tan (x)}{\sqrt {1+\cos ^2(x)}} \, dx &=-\left (\frac {1}{2} \operatorname {Subst}\left (\int \frac {1}{x \sqrt {1+x}} \, dx,x,\cos ^2(x)\right )\right )\\ &=-\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sqrt {1+\cos ^2(x)}\right )\\ &=\tanh ^{-1}\left (\sqrt {1+\cos ^2(x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 11, normalized size = 1.00 \[ \tanh ^{-1}\left (\sqrt {\cos ^2(x)+1}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Tan[x]/Sqrt[1 + Cos[x]^2],x]

[Out]

ArcTanh[Sqrt[1 + Cos[x]^2]]

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 16, normalized size = 1.45 \[ \log \left (\frac {\sqrt {\cos \relax (x)^{2} + 1} + 1}{\cos \relax (x)}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1+cos(x)^2)^(1/2),x, algorithm="fricas")

[Out]

log((sqrt(cos(x)^2 + 1) + 1)/cos(x))

________________________________________________________________________________________

giac [B]  time = 0.37, size = 27, normalized size = 2.45 \[ \frac {1}{2} \, \log \left (\sqrt {\cos \relax (x)^{2} + 1} + 1\right ) - \frac {1}{2} \, \log \left (\sqrt {\cos \relax (x)^{2} + 1} - 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1+cos(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/2*log(sqrt(cos(x)^2 + 1) + 1) - 1/2*log(sqrt(cos(x)^2 + 1) - 1)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 10, normalized size = 0.91 \[ \arctanh \left (\frac {1}{\sqrt {1+\cos ^{2}\relax (x )}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(1+cos(x)^2)^(1/2),x)

[Out]

arctanh(1/(1+cos(x)^2)^(1/2))

________________________________________________________________________________________

maxima [B]  time = 0.88, size = 60, normalized size = 5.45 \[ \frac {1}{2} \, \log \left (\frac {\sqrt {-\sin \relax (x)^{2} + 2}}{\sin \relax (x) + 1} + \frac {1}{\sin \relax (x) + 1} - 1\right ) + \frac {1}{2} \, \log \left (-\frac {\sqrt {-\sin \relax (x)^{2} + 2}}{\sin \relax (x) - 1} - \frac {1}{\sin \relax (x) - 1} + 1\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1+cos(x)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*log(sqrt(-sin(x)^2 + 2)/(sin(x) + 1) + 1/(sin(x) + 1) - 1) + 1/2*log(-sqrt(-sin(x)^2 + 2)/(sin(x) - 1) - 1
/(sin(x) - 1) + 1)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.09 \[ \int \frac {\mathrm {tan}\relax (x)}{\sqrt {{\cos \relax (x)}^2+1}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(x)/(cos(x)^2 + 1)^(1/2),x)

[Out]

int(tan(x)/(cos(x)^2 + 1)^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan {\relax (x )}}{\sqrt {\cos ^{2}{\relax (x )} + 1}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(x)/(1+cos(x)**2)**(1/2),x)

[Out]

Integral(tan(x)/sqrt(cos(x)**2 + 1), x)

________________________________________________________________________________________